package com.demo.project_template.controller;

import com.demo.project_template.entity.Friend;
import com.demo.project_template.service.FriendService;
import com.demo.project_template.vo.response.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 畅聊好友关系表 前端控制器
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-08-22 14:18:23
 */
@Api(tags = "畅聊好友")
@RestController
@RequestMapping("/friend")
public class FriendController {
    @Resource
    private FriendService friendService;

    @ApiOperation(value = "成为密聊好友")
    @PostMapping(value = "/friend")
    public R<?> becomeFriend(@RequestBody Friend friend){
        friendService.becomeFriend(friend);
        return R.success();
    }
}
